<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>在小程序中调用API在小程序中自定义弹窗组件 | Anson&#39;s Blog | 种一棵树最好的时间在十年前，其次是现在。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="小程序">
    <meta name="description" content="因为业务需要在小程序里加上很多的弹窗，就想写一个组件来实现； 创建组件 新建文件夹component专门放组件， 新建popup页面，在popup.json中设置：123&amp;#123;    &amp;quot;component&amp;quot;: true&amp;#125;   表明它是一个组件，我们称之为“子组件”  注意：在组件wxss中不应使用ID选择器、属性选择器和标签名选择器。（只使用class）如何使用">
<meta name="keywords" content="小程序">
<meta property="og:type" content="article">
<meta property="og:title" content="在小程序中调用API在小程序中自定义弹窗组件">
<meta property="og:url" content="http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/index.html">
<meta property="og:site_name" content="Anson&#39;s Blog">
<meta property="og:description" content="因为业务需要在小程序里加上很多的弹窗，就想写一个组件来实现； 创建组件 新建文件夹component专门放组件， 新建popup页面，在popup.json中设置：123&amp;#123;    &amp;quot;component&amp;quot;: true&amp;#125;   表明它是一个组件，我们称之为“子组件”  注意：在组件wxss中不应使用ID选择器、属性选择器和标签名选择器。（只使用class）如何使用">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2019-11-30T08:32:58.086Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="在小程序中调用API在小程序中自定义弹窗组件">
<meta name="twitter:description" content="因为业务需要在小程序里加上很多的弹窗，就想写一个组件来实现； 创建组件 新建文件夹component专门放组件， 新建popup页面，在popup.json中设置：123&amp;#123;    &amp;quot;component&amp;quot;: true&amp;#125;   表明它是一个组件，我们称之为“子组件”  注意：在组件wxss中不应使用ID选择器、属性选择器和标签名选择器。（只使用class）如何使用">
    
        <link rel="alternate" type="application/atom+xml" title="Anson&#39;s Blog" href="/atom.xml">
    
    <link rel="shortcut icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="https://yscoder.github.io/img/face.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">张宁乐</h5>
          <a href="mailto:zhangningle2017@gmail.com" title="zhangningle2017@gmail.com" class="mail">zhangningle2017@gmail.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/about"  >
                <i class="icon icon-lg icon-user"></i>
                关于
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/ansonznl" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">在小程序中调用API在小程序中自定义弹窗组件</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">在小程序中调用API在小程序中自定义弹窗组件</h1>
        <h5 class="subtitle">
            
                <time datetime="2019-11-30T08:20:14.000Z" itemprop="datePublished" class="page-time">
  2019-11-30
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#创建组件"><span class="post-toc-number">1.</span> <span class="post-toc-text">创建组件</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#如何使用组件"><span class="post-toc-number">2.</span> <span class="post-toc-text">如何使用组件</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#父组件传值给子组件"><span class="post-toc-number">3.</span> <span class="post-toc-text">父组件传值给子组件</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#子组件改变父组件的值"><span class="post-toc-number">4.</span> <span class="post-toc-text">子组件改变父组件的值</span></a></li></ol>
        </nav>
    </aside>


<article id="post-在小程序中自定义弹窗组件"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">在小程序中调用API在小程序中自定义弹窗组件</h1>
        <div class="post-meta">
            <time class="post-time" title="2019-11-30 16:20:14" datetime="2019-11-30T08:20:14.000Z"  itemprop="datePublished">
2019-11-30
<!--2019-11-30 16:32:58-->
</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <p>因为业务需要在小程序里加上很多的弹窗，就想写一个组件来实现；</p>
<h2 id="创建组件"><a href="#创建组件" class="headerlink" title="创建组件"></a>创建组件</h2><ol>
<li>新建文件夹<code>component</code>专门放组件，</li>
<li>新建popup页面，在popup.json中设置：<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;component&quot;: true</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ol>
<p>表明它是一个组件，我们称之为“子组件”</p>
<ol start="3">
<li>注意：在组件wxss中不应使用ID选择器、属性选择器和标签名选择器。（只使用class）<h2 id="如何使用组件"><a href="#如何使用组件" class="headerlink" title="如何使用组件"></a>如何使用组件</h2>便于区分，引用子组件的页面我们称之为“父组件，”<br>在父组件的json里先引用子组件：<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">  &quot;usingComponents&quot;: &#123;</span><br><span class="line">    &quot;component-tag-name&quot;: &quot;path/to/the/custom/component&quot;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ol>
<h2 id="父组件传值给子组件"><a href="#父组件传值给子组件" class="headerlink" title="父组件传值给子组件"></a>父组件传值给子组件</h2><p>因为这个自定义的弹窗组件会应用于很多不同的页面，所以显示的弹窗标题也是不同的，这就是需要父组件给子组件自定义标题，也就是子组件的标题应该从父组件中接受到的。<br>子组件里：<br>wxml<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&lt;view class=&quot;page&quot;&gt;</span><br><span class="line">  &lt;view&gt;&#123;&#123;popupTitle&#125;&#125;&lt;/view&gt;</span><br><span class="line">&lt;/view&gt;</span><br></pre></td></tr></table></figure></p>
<p>js<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">Component(&#123;</span><br><span class="line">  properties: &#123;</span><br><span class="line">    // 这里定义了innerText属性，属性值可以在组件使用时指定</span><br><span class="line">    popupTitle: &#123; //弹窗标题</span><br><span class="line">      type: String,</span><br><span class="line">      value: &apos;默认值&apos;, </span><br><span class="line">    &#125;</span><br><span class="line">  &#125;,</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure></p>
<p>父组件里：<br>wxml<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;popup popup-title=&quot;&#123;&#123;pagetitle&#125;&#125;&quot;/&gt;</span><br></pre></td></tr></table></figure></p>
<p>js<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">  data: &#123;</span><br><span class="line">    pagetitle: &apos;我是页面标题&apos;,</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>. 在子组件中自定义值是以小驼峰的形式书写的，但是在父组件传的时候要以“-”连接。</p>
<h2 id="子组件改变父组件的值"><a href="#子组件改变父组件的值" class="headerlink" title="子组件改变父组件的值"></a>子组件改变父组件的值</h2><p>这个组件的显示和隐藏都是在父组件决定的，但是因为我这是一个全屏的弹窗，覆盖了整个屏幕，所以想要关闭弹框只能想办法在子组件的点击事件上想办法。<br>基本逻辑是这样的：<br>操作流程：打开页面- 点击弹框（弹出子组件）- 点击关闭（点击子组件关闭弹窗）<br>数据流程：打开页面-点击弹框（传入弹窗标题、点赞成功结果、其他参数）-点击关闭（在父组件上自定义组件，然后子组件关闭按钮监听onTap事件，点击子组件关闭按钮时，会通知父组件去改变状态）</p>
<p>逻辑：</p>
<ol>
<li>在子组件中给要触发的元素加  bindtap = ‘onTap’</li>
<li>然后通过在method中设置onTap函数</li>
<li>在onTap中的triggerEvent中设置要触发父组件事件的函数名称</li>
<li>父组件接收到字组件的消息，然后触发事件</li>
</ol>
<p>具体参考：<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/events.html" target="_blank" rel="noopener">小程序-组件通信</a></p>
<p>子组件：<br>wxml<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;view class=&quot;hide-btn&quot; bindtap=&quot;onTap&quot;&gt;×&lt;/view&gt;</span><br></pre></td></tr></table></figure></p>
<p>js<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">methods: &#123; //放自定义的方法</span><br><span class="line">  onTap: function () &#123;</span><br><span class="line">    var myEventDetail = &#123;&#125; // detail对象，提供给事件监听函数</span><br><span class="line">    var myEventOption = &#123;&#125; // 触发事件的选项</span><br><span class="line">    console.log(`子组件：&apos;向父组件发送通知，我要关闭弹窗&apos;`)</span><br><span class="line">    this.triggerEvent(&apos;hidepopop&apos;, myEventDetail, myEventOption)</span><br><span class="line">  &#125;</span><br><span class="line">&#125;,</span><br></pre></td></tr></table></figure></p>
<p>父组件<br>wxml<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">  &lt;popup </span><br><span class="line">bindhidepopop=&quot;hidePopop&quot; </span><br><span class="line">is-show-popup=&quot;&#123;&#123;isShowPopup&#125;&#125;&quot; </span><br><span class="line">popup-title=&quot;&#123;&#123;popupTitle&#125;&#125;&quot; </span><br><span class="line">popup-content=&quot;&#123;&#123;popupContent&#125;&#125;&quot;</span><br><span class="line">/&gt;</span><br></pre></td></tr></table></figure></p>
<p>js<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">hidePopop: function(e) &#123;</span><br><span class="line">  console.log(e.detail) // 自定义组件触发事件时提供的detail对象</span><br><span class="line">  console.log(&apos;父组件：我接受到了子组件的关闭弹窗的通知！&apos;);</span><br><span class="line">  this.setData(&#123;</span><br><span class="line">    isShowPopup: true</span><br><span class="line">  &#125;)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>参考<a href="[https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/">小程序-自定义组件</a><br>)<br>代码地址：<a href="https://github.com/AnsonZnl/wx-component-popup" target="_blank" rel="noopener">https://github.com/AnsonZnl/wx-component-popup</a></p>

        </div>

        <blockquote class="post-copyright">
    
    <footer>
        <a href="http://yoursite.com">
            <img src="https://yscoder.github.io/img/face.jpg" alt="张宁乐">
            张宁乐
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/小程序/">小程序</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/&title=《在小程序中调用API在小程序中自定义弹窗组件》 — Anson's Blog&pic=https://yscoder.github.io/img/face.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/&title=《在小程序中调用API在小程序中自定义弹窗组件》 — Anson's Blog&source=张宁乐,博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《在小程序中调用API在小程序中自定义弹窗组件》 — Anson's Blog&url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2019/11/30/使用Promise封装小程序wx.request/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">使用Promise封装小程序wx.request</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2019/11/30/清除小程序button的默认样式/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">清除小程序button的默认样式</h4>
      </a>
    </div>
  
</nav>



    











    <!-- Valine Comments -->
    <div class="comments vcomment" id="comments"></div>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
    <!-- Valine Comments script -->
    <script>
        var GUEST_INFO = ['nick','mail','link'];
        var guest_info = 'nick,mail'.split(',').filter(function(item){
          return GUEST_INFO.indexOf(item) > -1
        });
        new Valine({
            el: '#comments',
            notify: 'false' == 'true',
            verify: 'false' == 'true',
            appId: "gbSwUaucLkuxqOLxm131Mg9U-gzGzoHsz",
            appKey: "b9xU2qIPrm06S0uymbAfrGMD",
            avatar: "mm",
            placeholder: "要不要说点什么？",
            guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
            pageSize: "10"
        })
    </script>
    <!-- Valine Comments end -->







</article>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>张宁乐 &copy; 2017 - 2019</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
			<span>
					Hosted by <a href="https://pages.coding.me" style="font-weight: bold">Coding Pages</a>
			  </span>
        </p>
    </div>
</footer>
<!-- <script>
(function(){
    var bp = document.createElement("script");
    var curProtocol = window.location.protocol.split(":")[0];
    if (curProtocol === "https") {
        bp.src = "https://zz.bdstatic.com/linksubmit/push.js";
    }
    else {
        bp.src = "http://push.zhanzhang.baidu.com/push.js";
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script> -->

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/&title=《在小程序中调用API在小程序中自定义弹窗组件》 — Anson's Blog&pic=https://yscoder.github.io/img/face.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/&title=《在小程序中调用API在小程序中自定义弹窗组件》 — Anson's Blog&source=张宁乐,博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《在小程序中调用API在小程序中自定义弹窗组件》 — Anson's Blog&url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2019/11/30/在小程序中自定义弹窗组件/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
